---
title: "Row Numbers"
enterprise: true
---

The Row Numbers Feature adds a Column that is always present at the start of the grid where each cell of this column will work as a row header.
The following example demonstrates the grid with Row Numbers and no additional configuration.

To enable Row Numbers, set the grid option `rowNumbers = true`.

{% apiDocumentation source="grid-options/properties.json" section="miscellaneous" names=["rowNumbers"] /%}

```{% frameworkTransform=true %}
const gridOptions = {
    rowNumbers: true
}
```

{% gridExampleRunner title="Row Numbers" name="row-numbers-default" /%}

## Cell Selection

When the grid is configured with [Cell Selection](./cell-selection/), clicking a Row Number will select all the currently visible cells in the row.

```{% frameworkTransform=true %}
const gridOptions = {
    rowNumbers: true,

    cellSelection: true
}
```
{% gridExampleRunner title="Row Numbers with Cell Selection" name="row-numbers-cell-selection" /%}

### Suppressing Integration

By default, clicking a row number selects a cell range including all the cells in the row. To prevent this behaviour use the `suppressCellSelectionIntegration` option.

```{% frameworkTransform=true %}
const gridOptions = {
    rowNumbers: {
        suppressCellSelectionIntegration: true
    },
    cellSelection: true
}
```

{% interfaceDocumentation interfaceName="RowNumbersOptions" config={ "description": "" } names=["suppressCellSelectionIntegration"] /%}

## Row Resizing

To allow the Row Numbers feature to resize rows, the `enableRowResizer` property can be used.

```{% frameworkTransform=true %}
const gridOptions = {
    rowNumbers: {
        enableRowResizer: true
    },
}
```

{% interfaceDocumentation interfaceName="RowNumbersOptions" config={ "description": "" } names=["enableRowResizer"] /%}

{% gridExampleRunner title="Row Numbers Row Resizer" name="row-numbers-row-resizer" /%}

{% note %}
The Row Resizer feature does not work when columns are configured with [Auto Row Height](./row-height/#auto-row-height).
{% /note %}


## Value Export

By default, when working with exporters such as [CSV Export](./csv-export/) or [Excel Export](./excel-export/), the value of the Row Numbers column is not exported. 
This behaviour can be changed by toggling the `exportRowNumbers` of the export params.

```{% frameworkTransform=true %}
const gridOptions = {
    rowNumbers: true,
    cellSelection: true,
    defaultCsvExportParams: {
        exportRowNumbers: true,
    },
    defaultExcelExportParams: {
        exportRowNumbers: true,
    },
}
```

### ExportParams
{% interfaceDocumentation interfaceName="ExportParams" config={ "description": "" } names=["exportRowNumbers"] /%}

{% gridExampleRunner title="Row Numbers with Export" name="row-numbers-export" /%}

## Customising Row Numbers

Row Numbers can be customised by providing a `RowNumbersOptions` object to the `rowNumbers` grid option:

{% interfaceDocumentation interfaceName="RowNumbersOptions" config={ "description": "" } 
/%}
